package com.yunlc.kubernetes.traefik.models;

import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.Objects;

@ApiModel(description = "IngressTLS describes the transport layer security associated with an Ingress.")
public class TraefikV1alpha1IngressTLS {

    @SerializedName("secretName")
    private String secretName = null;

    public TraefikV1alpha1IngressTLS secretName(String secretName) {
        this.secretName = secretName;
        return this;
    }

    /**
     * SecretName is the name of the secret used to terminate SSL traffic on 443. Field is left optional to allow SSL routing based on SNI hostname alone. If the SNI host in a listener conflicts with the \&quot;Host\&quot; header field used by an IngressRule, the SNI host is used for termination and value of the Host header is used for routing.
     * @return secretName
     **/
    @ApiModelProperty(value = "SecretName is the name of the secret used to terminate SSL traffic on 443. Field is left optional to allow SSL routing based on SNI hostname alone. If the SNI host in a listener conflicts with the \"Host\" header field used by an IngressRule, the SNI host is used for termination and value of the Host header is used for routing.")
    public String getSecretName() {
        return secretName;
    }

    public void setSecretName(String secretName) {
        this.secretName = secretName;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        TraefikV1alpha1IngressTLS extensionsV1beta1IngressTLS = (TraefikV1alpha1IngressTLS) o;
        return Objects.equals(this.secretName, extensionsV1beta1IngressTLS.secretName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(secretName);
    }


    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("class TraefikV1alpha1IngressTLS {\n");

        sb.append("    secretName: ").append(toIndentedString(secretName)).append("\n");
        sb.append("}");
        return sb.toString();
    }

    /**
     * Convert the given object to string with each line indented by 4 spaces
     * (except the first line).
     */
    private String toIndentedString(Object o) {
        if (o == null) {
            return "null";
        }
        return o.toString().replace("\n", "\n    ");
    }
}
